package demo;

import java.sql.SQLOutput;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: LIUYANJIAO
 * Date: 2024-05-24
 * Time: 19:24
 */
public class Main {
    public static void main(String[] args) {
        //实例成员与类成员
        Account.totaLMoney=1000000;
        Account account1=new Account("001");
        account1.money+=1000;
        Account account2=new Account("002");
        account2.money+=2000;
        System.out.println("账户"+account1.accountID+"有"+account1.money+"元");
        System.out.println("账户"+account2.accountID+"有"+account2.money+"元");
        System.out.println("目前，银行共有基金"+Account.totaLMoney);
    }
    public static void main3(String[] args) {
        //对象的组合--圆柱的体积
        Cylinder cylinder=new Cylinder(new Circle(10),50);
        System.out.println(cylinder.getVolume(cylinder.bottom, cylinder.height));
    }
    public static void main2(String[] args) {
        //参数传参--乘方
        Power power=new Power(2,3);
        System.out.println(power.ff1(power.x, power.y));
    }
    public static void main1(String[] args) {
        //类的构造方法
        Rectangle rectangle=new Rectangle('w','h');
        Rectangle rectangle1=new Rectangle();
        System.out.println( rectangle.width+"  "+rectangle.height);
        System.out.println( rectangle1.width+"  "+rectangle1.height);

    }
}
